package com.chat.common.vo;

import com.chat.common.enums.NettyUdpPackageType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wei kunJie
 * @date 2024/3/22 20:26:09
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class NettyUdpVo {
    public Long id;
    public NettyUdpPackageType type;
    public Map<String,Object> data;

    public static class NettyUdpDataBuilder{
        private Map<String,Object> data;
        public static NettyUdpDataBuilder builder(){
            return new NettyUdpDataBuilder();
        }
        private NettyUdpDataBuilder(){
            data=new HashMap<>();
        }
        public NettyUdpDataBuilder put(String key, Object value){
            this.data.put(key,value);
            return this;
        }
        public Map<String,Object> build(){
            return data;
        }
    }
}
